#ifndef Q_SHADER_H
#define	Q_SHADER_H
#include "stdafx.h"
class CEffect;
class CShader
{
	friend class CEffect;
public:
	enum eItemType{
		UNIFORM = 0,
		ATTRIBUTE,
		VARYING,
		FUNCTION,
		STATMENT,
	};


	typedef std::vector<std::string> ITEMLIST;
	CShader();
	~CShader();

	// can read from the file or create by the data formate of the fbx 
	void LoadShader( const char * pFileName );

	// add the item include function uniform attributes 
	void AddItem( eItemType type, const char * pName, const char *pValue );
	
	// different kind of the value
	void AddStatement( const char *pName, const char * pValue );
	void AddUniform( const char * pName, const char * pValue );
	void AddAttribute( const char *pName, const char * pValue );
	void AddVarying( const char *pName, const char * pValue );
	void AddFunction( const char *pName, const char * pValue );

	const char * GetSource();

private:
	ITEMLIST			m_listUniform;
	ITEMLIST			m_listAttribute;
	ITEMLIST			m_listVarying;
	ITEMLIST			m_listFunction;
	ITEMLIST			m_listStatement;

	ITEMLIST			m_listUniformName;
	ITEMLIST			m_listAttributeName;

	std::string		m_strSrc;

};

class VertexShader : public CShader
{
public:
	VertexShader();
	~VertexShader();

};

class FragmentShader : public CShader
{
public:
	FragmentShader();
	~FragmentShader();

};

#endif
